<?php
namespace app\api\controller;
use think\Controller;
use think\Session;
use think\Db;
class Whrent extends Controller
{
    
    public function __construct(){
        header('Access-Control-Allow-Origin:*');
        header('Access-Control-Allow-Methods:GET, POST, OPTIONS');
    }
    public function finds() {
        $res = Db::table("housedetails")->alias("a")
        ->join('houseimg i','a.house_id=i.house_id')
        ->field('a.house_id,a.house_des,a.house_type,a.house_size,a.house_price,i.img1')
        ->paginate(3);
        return json($res);
    }
}

